package cn.isjinhao.se.sql.grammar.statement.create.visitor;

import cn.isjinhao.se.sql.grammar.statement.*;

/**
 * @Author ISJINHAO
 * @Date 2021/4/7 18:58
 */
public abstract class InsertVisitorWithDelegate<R> extends InsertVisitor<R> {

    protected DelegateVisitor<R> delegate;

    protected void init(DelegateVisitor<R> delegate) {
        this.delegate = delegate;
    }

    @Override
    public R visitBinaryArithmetic(BinaryArithmetic binaryArithmetic) {
        return binaryArithmetic.accept(delegate);
    }

    @Override
    public R visitUnaryArithmetic(UnaryArithmetic unaryArithmetic) {
        return unaryArithmetic.accept(delegate);
    }

    @Override
    public R visitLiteral(Literal literal) {
        return literal.accept(delegate);
    }

    @Override
    public R visitGrouping(Grouping grouping) {
        return grouping.accept(delegate);
    }

    @Override
    public R visitIdentifier(Identifier identifier) {
        return identifier.accept(delegate);
    }

    @Override
    public R visitFunction(Function function) {
        return function.accept(delegate);
    }

    @Override
    public R visitAssignmentList(AssignmentList assignmentList) {
        return assignmentList.accept(delegate);
    }

    @Override
    public R visitTimeInterval(TimeInterval timeInterval) {
        return timeInterval.accept(delegate);
    }

    @Override
    public R visitTimeUnit(TimeUnit timeUnit) {
        return timeUnit.accept(delegate);
    }

    @Override
    public R visitBinary(Binary binary) {
        return binary.accept(delegate);
    }

    @Override
    public R visitUnary(Unary unary) {
        return unary.accept(delegate);
    }
}
